using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Richeng

	/// <summary>
	/// Richeng object for NHibernate mapped table 'Richeng'.
	/// </summary>
	public class Richeng
	{
		#region Member Variables
		
		protected int _id;
		protected string _worker;
		protected string _title;
		protected string _contents;
		protected int _state;
		protected DateTime _addDate;
		protected DateTime _beginDate;
		protected DateTime _remindDate;
		protected int _userId;
		protected bool _isDel;
		protected bool _isPub;

		#endregion

		#region Constructors

		public Richeng() { }

		public Richeng( string worker, string title, string contents, int state, DateTime addDate, DateTime beginDate, DateTime remindDate, int userId, bool isDel, bool isPub )
		{
			this._worker = worker;
			this._title = title;
			this._contents = contents;
			this._state = state;
			this._addDate = addDate;
			this._beginDate = beginDate;
			this._remindDate = remindDate;
			this._userId = userId;
			this._isDel = isDel;
			this._isPub = isPub;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string Worker
		{
			get { return _worker; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Worker", value, value.ToString());
				_worker = value;
			}
		}

		public  virtual string Title
		{
			get { return _title; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Title", value, value.ToString());
				_title = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual int State
		{
			get { return _state; }
			set { _state = value; }
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual DateTime BeginDate
		{
			get { return _beginDate; }
			set { _beginDate = value; }
		}

		public  virtual DateTime RemindDate
		{
			get { return _remindDate; }
			set { _remindDate = value; }
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual bool IsDel
		{
			get { return _isDel; }
			set { _isDel = value; }
		}

		public  virtual bool IsPub
		{
			get { return _isPub; }
			set { _isPub = value; }
		}

		

		#endregion
	}
	#endregion
}